# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=vala-lint
pkgver=0_git20200624
_sha=c06c691658e78881fe70d2b0455ae8e72eab90a3
pkgrel=0
pkgdesc="Check code-style of Vala code files"
url="https://github.com/vala-lang/vala-lint"
arch="all"
license="GPL-2.0-or-later"
makedepends="meson glib-dev vala"
source="$pkgname-$pkgver.tar.gz::https://github.com/vala-lang/vala-lint/archive/$_sha.tar.gz"
builddir="$srcdir/vala-lint-$_sha"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="da014b1743701c77d00bf2617430fc8084a4999bcaf7761b89bee0abc0a3d08a662d3eb8359dda980db0f5a77271f2b4bcf690d13b3e6c7f78a4573094ec3756  vala-lint-0_git20200624.tar.gz"
